home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / setjmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-05  |  1.0 KB  |  51 lines  |  [TEXT/MPS ]

  1. /*
  2.    SetJmp.h
  3.  
  4.    Copyright Apple Computer, Inc.    1986-1990, 1993-1995
  5.    All rights reserved.
  6.  */
  7.  
  8. /* Conditional Macros:
  9.  *    UsingStaticLibs    - for CFM-68K:  Insures that #pragma import is never used.
  10.  *    <none>            - for CFM-68K:    Insures that all functions and data items are
  11.  *                                    marked as library imports
  12.  */
  13.  
  14. #ifndef __SETJMP__
  15. #define __SETJMP__
  16.  
  17. #ifdef __CFM68K__
  18.     /* We MUST use the new, larger jmp_buf for CFM-68K */
  19.     #undef OLD_JMPBUF
  20. #endif
  21.  
  22. #if defined (powerc)
  23.     typedef long *jmp_buf[64];      /*  PowerPC  */
  24. #elif defined (OLD_JMPBUF)
  25.     typedef long *jmp_buf[12];        /*    old 68K:  D2-D7,PC,A2-A4,A6,SP  */
  26. #else
  27.     typedef long *jmp_buf[16];        /*    new 68K:  D2-D7,PC,A2-A4,A6,SP,FLAGS,A5,RESVD,RESVD  */
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if defined (__CFM68K__) && !defined (UsingStaticLibs)
  35.     #pragma import on
  36. #endif
  37.  
  38. int __setjmp(jmp_buf env);
  39. #define setjmp(env) __setjmp(env)
  40. void longjmp(jmp_buf, int);
  41.  
  42. #if defined (__CFM68K__) && !defined (UsingStaticLibs)
  43.     #pragma import off
  44. #endif
  45.  
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49.  
  50. #endif
  51.